import Vue from 'vue'
import Vuex from 'vuex'
import userStore from './modules/usersore'
import bs from './modules/BS/index'
import replyStore from './modules/replyStore'
import login from './modules/login/index' // 登录需要的store
import activity from './modules/activity/index'
import shop from './modules/shop/index' // 我要开店的store
import CommAdd from './modules/Comm/index'
import page from './modules/page/index'
Vue.use(Vuex)
export default new Vuex.Store({
    state: {
        // 主模块的状态
        loading: false,
        userNumber:"",
        email:''  , //邮箱
        TransactionPassword:'123456',   //交易密码
        LoginPassword:'' ,  //登录密码
        BusinessStatus:'营业中'    //营业状态

    },
    getters: {},
    mutations: {
        setLoading(state) {
            state.loading = !state.loading
        },
        setUserNumber(state, num){
            state.userNumber = num
            console.log(state.userNumber);
        },
        setEmail(state, email){
            state.email = email
            console.log(state.email);
        },
        setTransactionPassword(state, TransactionPassword){
            state.TransactionPassword = TransactionPassword
            console.log(state.TransactionPassword);
        },
        setBusinessStatus(state, BusinessStatus){
            state.BusinessStatus = BusinessStatus
            console.log('营业状态已修改为：',state.BusinessStatus);
        },
    },
    actions: {},
    modules: {
        user: userStore,
        reply: replyStore,
        Bus: bs,
        login: login,
        activity: activity,
        shop: shop,
      CommAdd: CommAdd,
        page:page
    }
})
